package com.lucnn.diamond.spring.config;

import com.lucnn.diamond.spring.bean.Person;
import org.springframework.context.annotation.*;

@Configuration
@ComponentScans(
        value = {
                @ComponentScan(value = "com.lucnn.diamond",
//                      excludeFilters = {@ComponentScan.Filter(type = FilterType.ANNOTATION,classes = {Controller.class, Service.class})},
                        includeFilters = {@ComponentScan.Filter(type = FilterType.CUSTOM,classes = {MyTypeFilter.class})},
                        useDefaultFilters = false
                )
        }
)
public class MainConfig {

    @Bean
    public Person person(){
        return new Person(17,"alask");
    }
}
